<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  <title>天才厨师</title>
  <link type="text/css" href="/javascripts/theme/ui.all.css" rel="stylesheet" />
  <link type="text/css" href="/javascripts/theme/ui.tabs.css" rel="stylesheet" />
  <script type="text/javascript" src="/javascripts/jquery-1.3.1.js"></script>
  <script type="text/javascript" src="/javascripts/jquery-ui-personalized-16.js"></script>

  <link type="text/css" href="/stylesheets/style.css" rel="stylesheet" />
  <script>
    $(function() {
      $(".rightclose").toggle(
        function () {
          $(this).attr({src:"/images/leftcolse.gif"});
          $("#sidebar").width(30);
          $("#sidebar_main").css({visibility:"hidden"});
          $("#main").css({"margin-right":"38px"});
        },
        function () {
          $(this).attr({src:"/images/rightclose.gif"});
          $("#sidebar").width(180).css({background:"#fff"});
          $("#sidebar_main").css({visibility:"visible"});
          $("#main").css({"margin-right":"188px"});
        }
      );
    });
  </script>


</head>
<body>
  <div id="wrap">
    <div id="header">
      <ul id="nav">
        <li><a href="/"><img src="/images/bg_r1_c1.gif" /></a></li>
        <li><a href="/skills"><img src="/images/bg_r1_c2.gif" /></a></li>
        <li><a href="/restaurent"><img src="/images/bg_r1_c3.gif" /></a></li>
        <li><a href="/market"><img src="/images/bg_r1_c4.gif" /></a></li>
        <li><a href="#"><img src="/images/bg_r1_c0.gif" /></a></li>
      </ul>
    </div>

    <% if flash[:notice] -%>
      <div id="flash_notice">
        <%= flash[:notice] %>
      </div>
    <% end -%>
    

    <%= yield -%>   <!-- Must contain div id="main" -->



    <div id="sidebar">
      <div id="sidebar_title">
        <img align="absmiddle" class="rightclose" src="/images/rightclose.gif"/> 好友
      </div>
      <div id="sidebar_main">
        <ul>
          <% User.find(:all).each do |u| %>
          <li style="padding: 2px;">
            <a href="/users/<%=u.id%>">  <%=user_img(u)%><%=u.name %></a>
          </li>
          <% end %>
        </ul>
      </div>
    </div>



    <div class="clear"></div>
    <div id="footer">
      <!-- <%=link_to 'Admin', admin_manage_path()%>  -->
    </div>

  </div>  <!-- End of div id="wrap" -->

</body>
</html>